package com.slmxz.tms.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.messaging.MessageChannel;

/**
 * 配置消息通道
 * @Author：albert
 * @Date：2025/4/30 16:35
 */
@Configuration
public class IntegrationConfig{

    /**
     * 定义订单创建的消息通道
     * @return
     */
    @Bean
    public MessageChannel orderCreatedChannel(){
        return new DirectChannel();
    }

    /**
     * 定义订单调度的消息通道
     * @return
     */
    @Bean
    public MessageChannel dispatchProcessedChannel(){
        return new DirectChannel();
    }

    /**
     * 定义最佳线路的消息通道
     * @return
     */
    @Bean
    public MessageChannel routeProcessedChannel(){
        return new DirectChannel();
    }
}
